﻿<Window x:Class="ShellAnywhere.View.ShellAnywhereView"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:sap="clr-namespace:ShellAnywhere.Properties"
		xmlns:local="clr-namespace:Idlesoft.ShellAnywhere.View"
		Title="ShellAnywhereView"
		Name="_ShellAnywhereView"
		AllowsTransparency="True"
		Left="0"
		Top="0"
		Visibility="{Binding Mode=TwoWay, Path=WindowVisibility}"
		Width="{Binding Source={x:Static SystemParameters.WorkArea}, Path=Width}"
		SizeToContent="Height"
		WindowStyle="None"
		ResizeMode="NoResize"
		ShowInTaskbar="False" 
		mc:Ignorable="d" 
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		d:DesignHeight="225">
	<Window.Resources>
		<Style TargetType="{x:Type ListViewItem}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListViewItem}">
						<Border SnapsToDevicePixels="True" x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
							<GridViewRowPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Columns="{TemplateBinding GridView.ColumnCollection}" Content="{TemplateBinding Content}"/>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="False">
								<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</Window.Resources>
	<StackPanel VerticalAlignment="Stretch" Height="Auto" Focusable="False">
		<ScrollViewer Visibility="{Binding Mode=OneWay, Path=OutputVisibility}" Width="{Binding Source={x:Static SystemParameters.WorkArea}, Path=Width}" MinHeight="300" MaxHeight="400" HorizontalScrollBarVisibility="Disabled">
			<ListView Name ="_OutputListView" Background="Black" ItemsSource="{Binding OutputItems, NotifyOnTargetUpdated=True}" VirtualizingStackPanel.IsVirtualizing="False" local:ListViewBehaviors.IsAutoUpdatingColumnWidths="True" BorderThickness="0" Padding="0" Focusable="False" Foreground="CornflowerBlue" >
				<ListView.View>
					<GridView>
						<GridView.ColumnHeaderContainerStyle>
							<Style TargetType="{x:Type GridViewColumnHeader}">
								<Setter Property="Visibility" Value="Collapsed"/>
								<Setter Property="HorizontalContentAlignment" Value="Stretch" />
								<Setter Property="Width" Value="Auto" />
								<Setter Property="Focusable" Value="False"/>
							</Style>
						</GridView.ColumnHeaderContainerStyle>
						<GridView.Columns>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Top" >
											<TextBlock FontSize="12" FontWeight="Bold" Text="{Binding Path=Time}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>											
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock FontSize="12" FontWeight="Bold" Text="{Binding Path=Entry}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
						</GridView.Columns>
					</GridView>
				</ListView.View>
			</ListView>
		</ScrollViewer>
		<StackPanel VerticalAlignment="Stretch" Height="Auto" Focusable="False">
			<ListView Name ="_ActionsListView" Background="CornflowerBlue" ItemsSource="{Binding ShellActions, NotifyOnTargetUpdated=True}" VirtualizingStackPanel.IsVirtualizing="False" local:ListViewBehaviors.IsAutoUpdatingColumnWidths="True" BorderThickness="0" Padding="0" Focusable="False" >
				<ListView.View>
					<GridView>
						<GridView.ColumnHeaderContainerStyle>
							<Style TargetType="{x:Type GridViewColumnHeader}">
								<Setter Property="Visibility" Value="Collapsed"/>
								<Setter Property="HorizontalContentAlignment" Value="Stretch" />
								<Setter Property="VerticalContentAlignment" Value="Stretch" />
								<Setter Property="Width" Value="Auto" />
								<Setter Property="Focusable" Value="False"/>
							</Style>
						</GridView.ColumnHeaderContainerStyle>
						<GridView.Columns>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock FontSize="36" FontWeight="ExtraBold" Text="{Binding Path=Prompt}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>											
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock FontSize="36" FontWeight="Bold" Text="{Binding Path=Matched}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
							<GridViewColumn>
								<GridViewColumn.CellTemplate>
									<DataTemplate>
										<Border BorderThickness="0,0,0,0" Margin="-6,0,-6,0" Padding="0,0,0,0" Width="Auto" VerticalAlignment="Stretch">
											<TextBlock FontSize="36" FontStyle="Italic" Text="{Binding Path=Unmatched}"/>
										</Border>
									</DataTemplate>
								</GridViewColumn.CellTemplate>
							</GridViewColumn>
						</GridView.Columns>
					</GridView>
				</ListView.View>
			</ListView>
		</StackPanel>
	</StackPanel>
</Window>

